package com.itheima.springbootmybatis.controller;

import com.itheima.springbootmybatis.pojo.User;
import com.itheima.springbootmybatis.service.UserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author ：sean
 * @date ：Created in 2021/4/8
 * @description ：
 * @version: 1.0
 */
@RestController
@Slf4j
@RequestMapping("/user")
public class UserController {

	@Autowired
	private UserService userService;

	@RequestMapping("/queryAll")
	public List<User> findAllUser(){
		log.info("[查询所有用户信息，findAllUser....]");
		return userService.findAll();
	}
}
